//
//  OptionView.swift
//  Twitter
//
//  Created by Hoa.wang on 2022/4/6.
//

import SwiftUI

struct OptionView: View {
    let sideMenuViewModel: SideMenuViewModel
    
    init(sideMenuViewModel: SideMenuViewModel) {
        self.sideMenuViewModel = sideMenuViewModel
    }
    
    var body: some View {
        HStack(spacing: 16) {
            Image(systemName: sideMenuViewModel.imageName)
                .font(.headline)
                .foregroundColor(.gray)
            
            Text(sideMenuViewModel.description)
                .font(.subheadline)
                .foregroundColor(.black)
            
            Spacer()
        }
        .frame(height: 40)
        .padding(.horizontal)
    }
}

struct OptionView_Previews: PreviewProvider {
    static var previews: some View {
        OptionView(sideMenuViewModel: SideMenuViewModel.profile)
    }
}
